home *** CD-ROM | disk | FTP | other *** search
/ Digital Talk 52 / Digital_Talk_52_2001-12-15_Digital_Talk_de_Side_A.d64 / spritedit 5 _kah (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  5KB  |  200 lines

  1. 0 rem ------kht-spritedit05------
  2. 1 q=peek(820):onqgoto3,4:d$="data[155]":k$="[157],":goto600
  3. 2 poke820,1:list49-70
  4. 3 poke820,2:goto100
  5. 4 goto410
  6. 9 open4,4:open5,4,6:cmd4:print#5,chr$(30):close5:close4:end
  7. 10 data  0,   0,   0
  8. 11 data  0,   0,   0
  9. 12 data  0,   0,   0
  10. 13 data  0,   0,   0
  11. 14 data  0,   0,   0
  12. 15 data  0,   0,   0
  13. 16 data  0,   0,   0
  14. 17 data  0,   0,   0
  15. 18 data  0,   0,   0
  16. 19 data  0,   0,   0
  17. 20 data  0,   0,   0
  18. 21 data  0,   0,   0
  19. 22 data  0,   0,   0
  20. 23 data  0,   0,   0
  21. 24 data  0,   0,   0
  22. 25 data  0,   0,   0
  23. 26 data  0,   0,   0
  24. 27 data  0,   0,   0
  25. 28 data  0,   0,   0
  26. 29 data  0,   0,   0
  27. 30 data  0,   0,   0
  28. 49 rem  765432107654321076543210
  29. 50 data ........................
  30. 51 data ........................
  31. 52 data ........................
  32. 53 data ........................
  33. 54 data ........................
  34. 55 data ........................
  35. 56 data ........................
  36. 57 data ........................
  37. 58 data ........................
  38. 59 data ........................
  39. 60 data ........................
  40. 61 data ........................
  41. 62 data ........................
  42. 63 data ........................
  43. 64 data ........................
  44. 65 data ........................
  45. 66 data ........................
  46. 67 data ........................
  47. 68 data ........................
  48. 69 data ........................
  49. 70 data ........................
  50. 100 fori=0to62:readd:next
  51. 110 d$="data[155]":k$="[157],"
  52. 200 fori=10to30
  53. 210 print"[152]"i;d$;
  54. 220 reada$
  55. 230 forj=0to2
  56. 240 b$=mid$(a$,8*j+1,8)
  57. 250 z=0
  58. 260 fork=1to8
  59. 270 c$=mid$(b$,k,1)
  60. 280 ifc$="."thenz=2*z
  61. 290 ifc$="*"thenz=2*z+1
  62. 300 next
  63. 302 ifj=2then312
  64. 310 printtab(5*j+9)z;k$;:nextj
  65. 312 printtab(5*j+9)z;
  66. 320 nextj
  67. 330 print
  68. 340 nexti
  69. 350 gosub380:stop
  70. 380 print"             [158]zeilen-<return> dann 'run'"
  71. 382 print"             [152]neustart  [155]'goto 922'[145][145][145][152]":return
  72. 400 rem ---daten in speicher?---
  73. 410 print"[147][152]daten in den speicher setzen ? <j[152]/n[152]>"
  74. 420 r$="":getr$:ifr$<>"j"andr$<>"n"then420
  75. 422 ifr$="j"then430
  76. 429 goto900
  77. 430 print"[152]an welchen sprite-speicherplatz ?"
  78. 432 print"zahl 13[152]-15[152] oder 128[152]-255[152] eingeben"
  79. 434 print"an spritespeicher: [158]";:poke19,1:inputm0:poke19,0:print
  80. 436 m=m0*64
  81. 440 print"[152]sollen die daten ab seicherstelle"
  82. 442 print"[157]"m"[152]in den speicher"
  83. 444 print"eingelesen werden?  <j[152]/n[152]>"
  84. 446 r$="":getr$:ifr$<>"j"andr$<>"n"then446
  85. 448 ifr$="j"then452
  86. 449 goto900
  87. 450 rem ---daten speichern---
  88. 452 restore
  89. 454 fori=0to62:readd:pokem+i,d:next
  90. 460 print"[152]die daten sind nun gespeichert !"
  91. 462 print"[152]kontrollansicht?   <j[152]/n[152]>"
  92. 464 r$="":getr$:ifr$<>"j"andr$<>"n"then464
  93. 466 ifr$="j"then470
  94. 469 goto900
  95. 470 print"[147]":fori=0to62step3
  96. 471 m1=peek(m+i):m2=peek(m+i+1):m3=peek(m+i+2)
  97. 472 print"[152]"m+i"[155]";
  98. 474 ifm1>99then478
  99. 475 ifm1>9then477
  100. 476 print" ";
  101. 477 print" ";
  102. 478 printm1;
  103. 480 ifm2>99then484
  104. 481 ifm2>9then483
  105. 482 print" ";
  106. 483 print" ";
  107. 484 printm2;
  108. 490 ifm3>99then494
  109. 491 ifm3>9then493
  110. 492 print" ";
  111. 493 print" ";
  112. 494 printm3
  113. 496 next
  114. 499 goto902
  115. 500 rem ---sprite-ansicht---
  116. 502 print"[147]":goto530
  117. 512 poke2040,m0
  118. 514 poke53248,32:poke53264,1:rem x-pos
  119. 516 poke53249,78:rem y-pos
  120. 518 poke53287,1:rem farbe
  121. 520 poke53271,1:poke53277,1:rem groesser
  122. 522 poke53269,1:rem einschalten
  123. 524 return
  124. 530 gosub512:poke820,0:run
  125. 600 rem ---programm-einstieg---
  126. 602 poke53280,5:poke53281,11:poke646,12:poke53269,0
  127. 604 print"[147][158]sprite-editor von kahate[152]"
  128. 605 print"[144]  weiter mit  <return>  [146][152]"
  129. 606 r$="":getr$:ifr$<>chr$(13)then606
  130. 608 print"sprite n[152]eu editieren  taste":print"spritedaten a[152]nsehen?";
  131. 610 print"  <n[152]/a[152]>"
  132. 612 r$="":getr$:ifr$<>"n"andr$<>"a"then612
  133. 614 on-(r$="n")-2*(r$="a")goto2,620
  134. 616 goto612
  135. 620 print"[152]an welchem sprite-platz"
  136. 622 print"befinden sich die daten?"
  137. 624 print"zahl 13[152]-15[152] oder 128[152]-255[152] eingeben"
  138. 626 print"spritespeicher-zahl: [158]";:poke19,1:inputm0:poke19,0:print:m=m0*64
  139. 628 print"[152]auswertung der spritedaten":print"ab speicherplatz:"m
  140. 630 print"[152]umrechnung <u[152]> - abbruch <a[152]>"
  141. 632 r$="":getr$:ifr$<>"u"andr$<>"a"then632
  142. 634 on-(r$="u")-2*(r$="a")goto650,900:goto632
  143. 640 m0$="":m0$=mid$(str$(m0),2)
  144. 642 iflen(m0$)>=3thenreturn
  145. 644 m0$=" "+m0$:goto642
  146. 650 poke820,1:print"[147][152]49 rem  765432107654321076543210"
  147. 652 gosub640:print"[145][144]#[158]"m0$"[155]"
  148. 654 fori=50to70
  149. 656 b$=mid$(str$(i),2)+chr$(32)
  150. 658 b$=b$+d$+chr$(32)
  151. 660 forj=0to2
  152. 662 u=peek(m+(3*(i-50))+j)
  153. 664 v=128
  154. 666 fork=0to7
  155. 668 onr1goto676
  156. 670 ifu>=vthenu$=u$+"*":goto690
  157. 672 ifu<vthenu$=u$+".":goto691
  158. 676 ifu>=vthenu$="*"+u$:goto690
  159. 678 ifu<vthenu$="."+u$:goto691
  160. 690 u=u-v
  161. 691 v=v-(v/2)
  162. 692 nextk:nextj
  163. 694 b$=b$+u$
  164. 696 printb$:b$="":u$=""
  165. 698 nexti:onr1goto790
  166. 700 printtab(8)"a[152]nzeige nr:        <+[152]/-[152]>"
  167. 702 printtab(8)"ab speicher       w[152]eiter[145][145]"
  168. 704 gosub640:printtab(22)"[158]"m0$"[152][145]"
  169. 710 r$="":getr$:ifr$="a"then800
  170. 712 on-(r$="+")-2*(r$="-")goto830,840
  171. 714 on-(r$="w")-2*(r$="n")goto720,922
  172. 716 goto710
  173. 720 printtab(8)" sprite  gespiegelt neu "
  174. 722 printtab(8)"  umrechnen?     <j[152]/n[152]>  [145][145]"
  175. 730 r$="":getr$:ifr$<>"n"andr$<>"j"then730
  176. 732 on-(r$="n")-2*(r$="j")goto740,742:goto730
  177. 740 r1=0:goto790
  178. 742 r1=1:goto650
  179. 790 gosub380:stop
  180. 799 poke198,0:wait198,1:stop
  181. 800 gosub640:m=m0*64
  182. 802 m$="":m$=mid$(str$(m),2)
  183. 804 iflen(m$)>=5then810
  184. 806 m$=" "+m$:goto804
  185. 810 printtab(20)"[158]"m$"[152][145][145]"
  186. 820 gosub512:goto704
  187. 830 m0=m0+1
  188. 832 ifm0>255thenm0=255
  189. 834 goto800
  190. 840 m0=m0-1
  191. 842 ifm0<0thenm0=0
  192. 844 goto800
  193. 900 print"[147]";
  194. 902 print"[152]sprite-a[152]nsicht prg-n[152]eustart e[152]nde?"
  195. 910 r$="":getr$:ifr$<>"a"andr$<>"n"andr$<>"e"then910
  196. 912 ifr$="a"thend$="data[155]":goto650
  197. 914 ifr$="n"then922
  198. 920 poke820,0:poke53280,14:poke53281,6:poke646,14:poke53269,0:print"[147]":end
  199. 922 poke53269,0:poke820,0:run
  200.